/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import type.Month;
import type.ProductionType;

/**
 *
 * @author wei
 */
@Entity(name="MasterProductionScheduleWeekly")
public class MasterProductionScheduleWeeklyEntity extends DataObjectEntity implements Serializable {
    private int yearOfProduction;
    private int weekOfProduction;
    private Month monthOfProduction;
    private ProductionType productionType;
    
    private long classicNuts;
    private long classicFruits;
    private long premiumNuts;
    private long premiumFruits;
    
    private long classicNuts2;
    private long classicFruits2;
    private long premiumNuts2;
    private long premiumFruits2;
    
    @ManyToOne
    private MasterProductionScheduleMonthlyEntity mpsMonthly1;
    private int weeklyWorkingDays1;
    @OneToMany(cascade={CascadeType.ALL}, mappedBy="mpsWeekly1")
    private Collection<ProductPercentageQuantityEntity> breakdownByProduct1 = new ArrayList<ProductPercentageQuantityEntity>();
    
    @ManyToOne
    private MasterProductionScheduleMonthlyEntity mpsMonthly2;
    private int weeklyWorkingDays2;
    @OneToMany(cascade={CascadeType.ALL}, mappedBy="mpsWeekly2")
    private Collection<ProductPercentageQuantityEntity> breakdownByProduct2 = new ArrayList<ProductPercentageQuantityEntity>();
    @OneToMany(cascade={CascadeType.ALL}, mappedBy="mpsWeekly")
    private Collection<MasterProductionScheduleDailyEntity> mpsDaily = new ArrayList<MasterProductionScheduleDailyEntity>();

    public MasterProductionScheduleWeeklyEntity() {
        super();
    }
    
    public Month getMonthOfProduction(){
        return monthOfProduction;
    }
    
    public void setMonthOfProduction(Month month){
        monthOfProduction = month;
    }
    
    public ProductionType getProductionType(){
        return productionType;
    }
    
    public void setProductionType(ProductionType type){
        productionType = type;
    }

    public int getWeekOfProduction() {
        return weekOfProduction;
    }

    public void setWeekOfProduction(int weekOfProduction) {
        this.weekOfProduction = weekOfProduction;
    }

    public int getYearOfProduction() {
        return yearOfProduction;
    }

    public void setYearOfProduction(int yearOfProduction) {
        this.yearOfProduction = yearOfProduction;
    }

    public Collection<ProductPercentageQuantityEntity> getBreakdownByProduct1() {
        return breakdownByProduct1;
    }

    public void setBreakdownByProduct1(Collection<ProductPercentageQuantityEntity> breakdownByProduct1) {
        this.breakdownByProduct1 = breakdownByProduct1;
    }

    public Collection<ProductPercentageQuantityEntity> getBreakdownByProduct2() {
        return breakdownByProduct2;
    }

    public void setBreakdownByProduct2(Collection<ProductPercentageQuantityEntity> breakdownByProduct2) {
        this.breakdownByProduct2 = breakdownByProduct2;
    }

    public MasterProductionScheduleMonthlyEntity getMpsMonthly1() {
        return mpsMonthly1;
    }

    public void setMpsMonthly1(MasterProductionScheduleMonthlyEntity mpsMonthly1) {
        this.mpsMonthly1 = mpsMonthly1;
    }

    public MasterProductionScheduleMonthlyEntity getMpsMonthly2() {
        return mpsMonthly2;
    }

    public void setMpsMonthly2(MasterProductionScheduleMonthlyEntity mpsMonthly2) {
        this.mpsMonthly2 = mpsMonthly2;
    }

    public int getWeeklyWorkingDays1() {
        return weeklyWorkingDays1;
    }

    public void setWeeklyWorkingDays1(int weeklyWorkingDays1) {
        this.weeklyWorkingDays1 = weeklyWorkingDays1;
    }

    public int getWeeklyWorkingDays2() {
        return weeklyWorkingDays2;
    }

    public void setWeeklyWorkingDays2(int weeklyWorkingDays2) {
        this.weeklyWorkingDays2 = weeklyWorkingDays2;
    }

    @Override
    public String childToString() {
        return "MasterProductionScheduleWeeklyEntity{" + "yearOfProduction=" + yearOfProduction + ", weekOfProduction=" + weekOfProduction + ", mpsMonthly1=" + mpsMonthly1 + ", weeklyWorkingDays1=" + weeklyWorkingDays1 + ", breakdownByProduct1=" + breakdownByProduct1 + ", mpsMonthly2=" + mpsMonthly2 + ", weeklyWorkingDays2=" + weeklyWorkingDays2 + ", breakdownByProduct2=" + breakdownByProduct2 + '}';
    }

    public Collection<MasterProductionScheduleDailyEntity> getMpsDaily() {
        return mpsDaily;
    }

    public void setMpsDaily(Collection<MasterProductionScheduleDailyEntity> mpsDaily) {
        this.mpsDaily = mpsDaily;
    }

    public long getClassicNuts() {
        return classicNuts;
    }

    public void setClassicNuts(long classicNuts) {
        this.classicNuts = classicNuts;
    }

    public long getClassicFruits() {
        return classicFruits;
    }

    public void setClassicFruits(long classicFruits) {
        this.classicFruits = classicFruits;
    }

    public long getPremiumNuts() {
        return premiumNuts;
    }

    public void setPremiumNuts(long premiumNuts) {
        this.premiumNuts = premiumNuts;
    }

    public long getPremiumFruits() {
        return premiumFruits;
    }

    public void setPremiumFruits(long premiumFruits) {
        this.premiumFruits = premiumFruits;
    }

    public long getClassicNuts2() {
        return classicNuts2;
    }

    public void setClassicNuts2(long classicNuts2) {
        this.classicNuts2 = classicNuts2;
    }

    public long getClassicFruits2() {
        return classicFruits2;
    }

    public void setClassicFruits2(long classicFruits2) {
        this.classicFruits2 = classicFruits2;
    }

    public long getPremiumNuts2() {
        return premiumNuts2;
    }

    public void setPremiumNuts2(long premiumNuts2) {
        this.premiumNuts2 = premiumNuts2;
    }

    public long getPremiumFruits2() {
        return premiumFruits2;
    }

    public void setPremiumFruits2(long premiumFruits2) {
        this.premiumFruits2 = premiumFruits2;
    }
    
}
